package kuzmenkov.oip.controller.applet;

import java.util.List;
import java.util.Locale;

import org.springframework.context.support.AbstractMessageSource;

/**
 * Interface describes available methods to call to the server 
 * @author Michael Kuzmenkov 
 * Date: 08.03.2009 Time: 14:51:02
 */
public interface ClientService {
	
	/**
	 * The root path of the site
	 */
	String ROOT_PATH = "oip";
	
	/**
	 * The test method
	 * @param input
	 * @return
	 */
	String getRemoteCallResult(String input);

	
	/**
	 * Returns a current site locale  from a server
	 * @return
	 * @throws Exception 
	 */
	Locale getRemoteLocale() throws Exception;
	
	AbstractMessageSource getMessageSource ();
	
	/**
	 * Returns module parameters remotely. Class of list elements are 
	 * Map<String,Object>. It contains the keys: name, defaltValue, describe, etc 
	 * 
	 * @return list of parameters
	 * @throws Exception 
	 */
	List getRemoteParameters() throws Exception;
	
	/**
	 * Returns input image data remotely. Class of list elements are Map<String,Object>
	 * @return
	 * @throws Exception 
	 */
	List getRemoteImages() throws Exception;

	/**
	 * Runs the remote image processing 
	 * @param params the input parameters
	 * @return the output parameters
	 * @throws Exception 
	 */
	Object[] processRemotely(Object[] params) throws Exception;

}
